<?php
class dcAgendaPage extends dcPage {
	
	
	/**
	 * Charge le date picker agenda (jquery ui)
	 *
	 * @param string $lg code langue
	 * @return String
	 */
	public static function AgendaDatePicker($lg='fr'){
		//var_dump($lg); exit;
		return
		//'<link rel="stylesheet" type="text/css" href="style/date-picker.css" />'."\n".
		self::jsLoad('index.php?pf=agendaPlugin/js/jquery-ui-personalized-1.6rc2.min.js').
		self::jsLoad('index.php?pf=agendaPlugin/js/ui/i18n/ui.datepicker-'.$lg.'.js').
		'<script type="text/javascript">'."\n".
		"//<![CDATA[\n".
		"jQuery(function($){\n".
		"var a = {dateFormat:'yy-mm-dd'};\n".
		"$.extend(".
		"$.datepicker.regional['$lg'], a);\n".
		"$.datepicker.setDefaults($.datepicker.regional['$lg']);\n".
		"});\n".
		"\n//]]>\n".
		"</script>\n";
		
		
	}
	/**
	 * Charge le theme css du plugin
	 *
	 * @param string $theme le nom du theme 
	 * @return string
	 */
	public static function loadAgendaTheme($theme='default')
	{
		return '<link rel="stylesheet" type="text/css" href="index.php?pf=agendaPlugin/themes/'.$theme.'/style.css" />'.
		'<script type="text/javascript">'."\n".
		"//<![CDATA[\n".
		"agenda.theme = '".$theme."';\n".
		"\n//]]>\n".
		"</script>\n";
	}
}
?>